<?php

/**
 * Inscriptions form base class.
 *
 * @method Inscriptions getObject() Returns the current form's model object
 *
 * @package    espace14
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseContactForm extends BaseForm
{
   public function setup()
  {
    // this is required, don't forget this!
     $this->widgetSchema->setNameFormat('contact_form[%s]');
 
    $this->setWidget('name', new sfWidgetFormInput());
    $this->setValidator('name', new sfValidatorString(array('required' => true)));
 
    $this->setWidget('email', new sfWidgetFormInput());
    $this->setValidator('email', new sfValidatorEmail(array('required' => true)));
	
	$this->setWidget('phone', new sfWidgetFormInput());
    $this->setValidator('phone', new sfValidatorString(array('required' => true)));
	
	$this->setWidget('address', new sfWidgetFormInput());
    $this->setValidator('address', new sfValidatorString(array('required' => false)));
	
    $this->setWidget('codepostale', new sfWidgetFormInput());
    $this->setValidator('codepostale', new sfValidatorString(array('required' => true)));
	
	 $this->setWidget('ville', new sfWidgetFormInput());
    $this->setValidator('ville', new sfValidatorString(array('required' => true)));
	
	$this->setWidget('comments', new sfWidgetFormTextArea());
    $this->setValidator('comments', new sfValidatorString(array('required' => true)));
 
    parent::setup();
  }

}
